/* Location.h - A location class
 *
 * Copyright (C) 2008 Yuuichi Teranishi
 *
 * This file is part of iSpotter.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2
 * published by the Free Software Foundation.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with this program; If not, write to the Free Software Foundation,
 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
#import "Location.h"

@implementation Location
- (id) initWithLat:(double)latitude lng:(double)longitude
{
  self = [super init];
  lat = latitude;
  lng = longitude;
  f = 0;
  return self;
}

- (id) initWithLat:(double)latitude lng:(double)longitude floor:(int)floor
{
  self = [super init];
  lat = latitude;
  lng = longitude;
  f = floor;
  return self;
}
- (BOOL) isEqual:(Location *)location
{
  if (lat == [location longitude] && lng == [location latitude]) {
    return YES;
  }
  return NO;
}
- (double) longitude
{
  return lng;
}
- (double) latitude
{
  return lat;
}
- (int) floor
{
  return f;
}
@end
